package com.dora.rabbitmq.listener;


import com.dora.rabbitmq.po.Mail;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 队列监听器 1
 *
 * @author Clarence
 * @date 2025/03/22
 */
@Slf4j
@Component
public class QueueListener1 {

    @RabbitListener(queues = "myqueue")
    public void displayMail(Mail mail) throws Exception {
        log.info("队列监听器1号,收到消息:{}", mail.toString());
    }

}
